package pipeline

import "aqielife.cn/spider/models"

type ArticleChannel struct {
	reqpchan   chan models.Request  //请求
	respchan   chan models.Response //结果
	listchan   chan []models.ArticleDetail
	detailchan chan models.ArticleDetail
}

func NewArticleChannel() *ArticleChannel {
	return &ArticleChannel{
		make(chan models.Request, 1),
		make(chan models.Response, 1),
		make(chan []models.ArticleDetail, 10),
		make(chan models.ArticleDetail, 10),
	}
}

func (c *ArticleChannel) ReqChan() chan models.Request {
	return c.reqpchan
}

func (c *ArticleChannel) RespChan() chan models.Response {
	return c.respchan
}

func (c *ArticleChannel) RespListChan() chan []models.ArticleDetail {
	return c.listchan
}

func (c *ArticleChannel) RespDetailChan() chan models.ArticleDetail {
	return c.detailchan
}
